package myjava.processi;

class Cronometro implements Runnable {

   synchronized public void run() {

      int duration = 11;

      while (duration > 0) {
         
         --duration;
         System.out.println("hello I am " + Thread.currentThread().getName() + " - iteration " + duration);
         System.out.println("time: " + duration);
         System.out.println("------------");
         
         try {
            Thread.sleep(400);
         } catch (Exception e) {
            e.printStackTrace();
         }
      }
   }
}